<script>
	import * as Api from "@/service/api.js"
	import Db from '@/service/db.js'
	export default {
		onLaunch: function() {
			this.judgeWorkMode();
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			judgeWorkMode: function() {
				// 判断环境是否是线上
				let href = window.location.href
				if (!!href.match(/localhost/) || !!href.match(/192\.168\./)) {
					// 线下环境 开发环境
					Db._SetStorage('work_mode', 'development')
				} else {
					// 线上环境 生产环境
					Db._SetStorage('work_mode', 'production')
				}
			}
		}
	}
</script>

<style>
	@import url("/font/icon.css");

	/*每个页面公共css */
	text {
		font-size: 26rpx;
	}
</style>
